package com.hx.myblog3.control.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hx.myblog3.entity.ArticleType;
import com.hx.myblog3.service.ArticleTypeService;

@RestController
@RequestMapping("/admin")
public class ArticleTypeControl {
	@Autowired
     private ArticleTypeService ats;
	
	@RequestMapping("/allTypes")
	public List<ArticleType> getTypes(){
		return ats.all();
	}
	
      
}
